Skip to content

Simplify the Rule API#481

Merged
popescu-v merged 6 commits into
devfrom
479-improve-khrule-support
Sep 30, 2025
Merged

Simplify the Rule API#481
popescu-v merged 6 commits into
devfrom
479-improve-khrule-support

Conversation

@popescu-v

@popescu-v popescu-v commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator

Only attach rules to variables (and variable blocks) as strings.

Also add notes to the Rule object

closes #479


TODO Before Asking for a Review

  • Rebase your branch to the latest version of dev (or main for release PRs)
  • Make sure all CI workflows are green
  • [ ] When adding a public feature/fix: Update the Unreleased section of CHANGELOG.md (no date) Not needed: it's just a simplification of an already-announced feature.
  • Self-Review: Review "Files Changed" tab and fix any problems you find
  • API Docs (only if there are changes in docstrings, rst files or samples):
    • Check the docs build without warning: see the log of the API Docs workflow
    • Check that your changes render well in HTML: download the API Docs artifact and open index.html
    • If there are any problems it is faster to iterate by building locally the API Docs

@popescu-v popescu-v self-assigned this Sep 29, 2025
@popescu-v popescu-v linked an issue Sep 29, 2025 that may be closed by this pull request
@popescu-v popescu-v marked this pull request as ready for review September 30, 2025 12:58
@popescu-v popescu-v force-pushed the 479-improve-khrule-support branch from 9a43909 to e193013 Compare September 30, 2025 13:01
Comment thread khiops/core/dictionary.py Outdated
Comment thread khiops/core/dictionary.py Outdated
Comment thread khiops/core/dictionary.py Outdated
Comment thread doc/samples/samples.rst
Comment thread doc/samples/samples.rst
Comment thread khiops/core/dictionary.py
Only attach rules to variables (and variable blocks) as strings.

Also add notes to the `Rule` object docstring.

TODO: Add some rule serialization examples.

related_to #479
Indeed, parenthesized no-operand rule specification can only be done via
the `verbatim` parameter.
- add rule creation examples
- add details to the docstring of the `Rule.write` method.
@popescu-v popescu-v force-pushed the 479-improve-khrule-support branch from e193013 to 1dd711b Compare September 30, 2025 15:36

@folmos-at-orange folmos-at-orange left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention somewhere in the Rule class docstring that it is a "rule factory".

@popescu-v popescu-v merged commit 90ac3b4 into dev Sep 30, 2025
19 checks passed
@popescu-v popescu-v deleted the 479-improve-khrule-support branch September 30, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve kh.Rule Support

3 participants